﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ArtOfNet.Framework.Data.Schema
{
    /// <summary>
    /// Enumeration of all sql objects types
    /// </summary>
    public enum ObjectType
    {
        CHECK_CONSTRAINT,
        CLR_SCALAR_FUNCTION,
        CLR_TABLE_VALUED_FUNCTION,
        DEFAULT_CONSTRAINT,
        FOREIGN_KEY_CONSTRAINT,
        INTERNAL_TABLE,
        PRIMARY_KEY_CONSTRAINT,
        SERVICE_QUEUE,
        SQL_SCALAR_FUNCTION,
        SQL_STORED_PROCEDURE,
        SQL_TABLE_VALUED_FUNCTION,
        SQL_TRIGGER,
        SYSTEM_TABLE,
        UNIQUE_CONSTRAINT,
        USER_TABLE,
        VIEW
    }

    /// <summary>
    /// Provide a static class with values of sql objects different types
    /// </summary>
    public static class SystemObjectType
    {
        public static string CHECK_CONSTRAINT = "C ";
        public static string CLR_SCALAR_FUNCTION = "FS";
        public static string CLR_TABLE_VALUED_FUNCTION = "FT";
        public static string DEFAULT_CONSTRAINT = "D ";
        public static string FOREIGN_KEY_CONSTRAINT = "F ";
        public static string INTERNAL_TABLE = "IT";
        public static string PRIMARY_KEY_CONSTRAINT = "PK";
        public static string SERVICE_QUEUE = "SQ";
        public static string SQL_SCALAR_FUNCTION = "FN";
        public static string SQL_STORED_PROCEDURE = "P ";
        public static string SQL_TABLE_VALUED_FUNCTION = "TF";
        public static string SQL_TRIGGER = "TR";
        public static string SYSTEM_TABLE = "S ";
        public static string UNIQUE_CONSTRAINT = "UQ";
        public static string USER_TABLE = "U ";
        public static string VIEW = "V ";
    }
}
